package com.song.tools.mvc.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 批量id请求体
 * </p>
 *
 * @author song tools
 * @since 2024-06-06
 */
@Schema(title = "BatchIdRequest", description = "批量ID请求体")
@Data
public class BatchIdRequest<T> implements Serializable {
    @Serial
    private static final long serialVersionUID = 656592830271418376L;

    @JsonProperty("ids")
    @NotEmpty(message = "请求ID列表不能为空")
    @Schema(title = "ids", description = "请求ID列表", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<T> ids;
}
